<?php 
	include("global.php");
        $numPage=$_GET['numPage'];
        $TOT=numRowCommunication();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>

           
            <script src="files/js/jquery-1.4.2.js" type="text/javascript"></script>
            
            <script src="files/js/jquery.tools.min.js" type="text/javascript"></script>
            <script src="files/js/jquery.tablesorter.js" type="text/javascript"></script>
            <script src="files/js/jquery.tablesorter.pager.js" type="text/javascript"></script>
            <script src="files/js/overlay.js" type="text/javascript"></script>
            
            <script type="text/javascript" src="files/js/core.js"></script>
            <script type="text/javascript" src="files/js/more.js"></script>
            <script type="text/javascript" src="files/js/lang/it.js"></script> 
            
    <!--	<script type="text/javascript" src="files/js/jquery.tools.min.js"></script> -->
            <script type="text/javascript" src="files/js/formcheck.js"></script> 
            
            <link media="screen" type="text/css" href="style/form.css" rel="stylesheet" />
            <link media="screen" type="text/css" href="style/formcheck.css" rel="stylesheet" /> 
            <link rel="stylesheet" type="text/css" href="style/overlay-apple.css"/> 
            <link rel="stylesheet" type="text/css" href="style/themes/blue/style.css"/> 
       
            <script src="files/js/alarm_ajax.js" type="text/javascript"></script>
           <script type="text/javascript">
        
        $(document).ready(function() { 
            // call the tablesorter plugin 
            $("table").tablesorter({ 
                // sort on the first column and third column, order asc 
                sortList: [[0,0],[1,0]] 
            }); 
        }); 
     
            </script>
            <style type="text/css">
                A:link, A:visited { text-decoration: none }
                A:hover { text-decoration: underline }
            </style>


   	</head>
        <body >
            <form>
            <div >
                <fieldset>
                <fieldset><legend><b>Stato allarmi inviati</b></legend>
                    <a href="#" onclick="javascript:loadArchivioTab('files/php/send_status_alarm.php?numPage=0','showDivImpo');">    
                        <img src="images/icon/first.png" class="first"/></a>
                    <?php 
                            if($numPage>0)
                            {
                                $prec=$numPage-1;
                                print ("<a href=\"#\" onclick=\"javascript:loadArchivioTab('files/php/send_status_alarm.php?numPage=$prec&idParse=$prec','showDivImpo');\">
                                         << Pagina Precedente --</a>");
                            }
                            
                            if($numPage<($TOT-1))
                            {
                                $succ=$numPage+1;
                                $stringa="<a href=\"#\" onclick=\"javascript:loadArchivioTab('files/php/send_status_alarm.php?numPage=$succ&idParse=$succ','showDivImpo');\">
                                Pagina Successiva >> </a>";
                                print ($stringa);
                            }
                            $last=round($TOT);
                            $stringa="<a href=\"#\" onclick=\"javascript:loadArchivioTab('files/php/send_status_alarm.php?numPage=$last&idParse=$succ','showDivImpo');\">
                            <img src=\"images/icon/last.png\" class=\"last\"/> </a>";
                            print $stringa;
                        
                    ?>
                    
                    <table cellspacing="1" class="tablesorter" id="myTableStatusAlarm">
                            <thead>
                                    <tr>
                                            <th>ID</th>
                                            <th>Inserimento Data</th>
                                            <th>Destinazione</th>
                                            <th>Tipo</th>
                                            <th>Stato</th>
                                            <th>Messaggio</th>
                                            <th>&nbsp;</th>
                                            
                                            
                                    </tr>
                            </thead>
                                 <tfoot>
                                <tr>
                                        <td colspan="5" class="rounded-foot-left"><em>Elenco elementi rubrica sms</em></td>
                                        <td class="rounded-foot-right">&nbsp;</td>
                                        
                                </tr>
                            </tfoot>
                            <tbody>
                                    <?php
                                    PrintStatoAllarm($numPage);
                                   
                                    ?>
                            </tbody>
                    </table>
                    <a href="#" onclick="javascript:loadArchivioTab('files/php/send_status_alarm.php?numPage=0','showDivImpo');">    
                        <img src="images/icon/first.png" class="first"/></a>
                    <?php 
                            if($numPage>0)
                            {
                                $prec=$numPage-1;
                                print ("<a href=\"#\" onclick=\"javascript:loadArchivioTab('files/php/send_status_alarm.php?numPage=$prec&idParse=$prec','showDivImpo');\">
                                         << Pagina Precedente --</a>");
                            }
                            
                            if($numPage<($TOT-1))
                            {
                                $succ=$numPage+1;
                                $stringa="<a href=\"#\" onclick=\"javascript:loadArchivioTab('files/php/send_status_alarm.php?numPage=$succ&idParse=$succ','showDivImpo');\">
                                Pagina Successiva >> </a>";
                                print ($stringa);
                            }
                            $last=round($TOT);
                            $stringa="<a href=\"#\" onclick=\"javascript:loadArchivioTab('files/php/send_status_alarm.php?numPage=$last&idParse=$succ','showDivImpo');\">
                            <img src=\"images/icon/last.png\" class=\"last\"/> </a>";
                            print $stringa;
                        
                    ?>
                </fieldset>
                
               
                </fieldset>
                 
                </div>
            </form>
           
                <br></br>
                <div class="apple_overlay" id="overlay">
                            <div class="contentWrap"></div>
                </div>
                
              

	</body>
    <script id="windowOnload" type="text/javascript">
        window.onload = init;
</script>
</html>